package com.skeleton.db.entity;

import com.skeleton.db.dto.LoginHistoryDto;
import com.skeleton.utils.SystemTools;

public class LoginHistory {

	private String loginname;
	private int login_dttm;
	private char status;
	private String address;
	private String ip;

	public LoginHistoryDto toDto() {
		LoginHistoryDto dto = new LoginHistoryDto();
		dto.setUserLoginname(loginname);
		dto.setLoginDttm(login_dttm);
		dto.setLoginDttmStr(SystemTools.formatDTTM(SystemTools.convertIntToDTTM(login_dttm)));
		dto.setLoginStatus(status);
		dto.setLoginAddress(address);
		dto.setLoginIp(ip);
		return dto;
	}
	
	public String getLoginname() {
		return loginname;
	}

	public void setLoginname(String loginname) {
		this.loginname = loginname;
	}

	public int getLogin_dttm() {
		return login_dttm;
	}

	public void setLogin_dttm(int login_dttm) {
		this.login_dttm = login_dttm;
	}

	public char getStatus() {
		return status;
	}

	public void setStatus(char status) {
		this.status = status;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

}
